package ysq.xyg.base.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 选择器通用部分
 *
 * @author shengQiang yu
 * @date 2018-03-18 15:42
 */
@RestController
public class SelectorController extends BaseController {
    private static Logger log= LoggerFactory.getLogger(SelectorController.class);


    /**
     * 选择器跳转统一跳转处理
     *
     * @author shengQiang yu
     * @date 2019-03-02 16:28
     */
    @RequestMapping("/base/selector/*")
    public Model goPage(Model model) {
        return model;
    }

    /**
     * 单选选择器跳转统一跳转处理
     *
     * @author shengQiang yu
     * @date 2019-03-02 16:28
     */
    @RequestMapping("/base/selector/single")
    public ModelAndView goSinglePage(String url) {
        ModelAndView modelAndView=new ModelAndView("/base/selector/singleSelector");
        modelAndView.addObject("url",url);
        return modelAndView;
    }
    /**
     * 多选选择器跳转统一跳转处理
     *
     * @author shengQiang yu
     * @date 2019-03-02 16:28
     */
    @RequestMapping("/base/selector/mult")
    public ModelAndView goMultPage(String url) {
        ModelAndView modelAndView=new ModelAndView("/base/selector/multSelector");
        modelAndView.addObject("url",url);
        return modelAndView;
    }

}
